package com.health.teahouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.health.teahouse.mapper.VegetablesMapper;
import com.health.teahouse.domain.Vegetables;
import com.health.teahouse.service.IVegetablesService;

/**
 * 蔬菜信息Service业务层处理
 * 
 * @author yang
 * @date 2024-01-10
 */
@Service
public class VegetablesServiceImpl implements IVegetablesService 
{
    @Autowired
    private VegetablesMapper vegetablesMapper;

    /**
     * 查询蔬菜信息
     * 
     * @param vegetableId 蔬菜信息主键
     * @return 蔬菜信息
     */
    @Override
    public Vegetables selectVegetablesByVegetableId(Long vegetableId)
    {
        return vegetablesMapper.selectVegetablesByVegetableId(vegetableId);
    }

    /**
     * 查询蔬菜信息列表
     * 
     * @param vegetables 蔬菜信息
     * @return 蔬菜信息
     */
    @Override
    public List<Vegetables> selectVegetablesList(Vegetables vegetables)
    {
        return vegetablesMapper.selectVegetablesList(vegetables);
    }

    /**
     * 新增蔬菜信息
     * 
     * @param vegetables 蔬菜信息
     * @return 结果
     */
    @Override
    public int insertVegetables(Vegetables vegetables)
    {
        return vegetablesMapper.insertVegetables(vegetables);
    }

    /**
     * 修改蔬菜信息
     * 
     * @param vegetables 蔬菜信息
     * @return 结果
     */
    @Override
    public int updateVegetables(Vegetables vegetables)
    {
        return vegetablesMapper.updateVegetables(vegetables);
    }

    /**
     * 批量删除蔬菜信息
     * 
     * @param vegetableIds 需要删除的蔬菜信息主键
     * @return 结果
     */
    @Override
    public int deleteVegetablesByVegetableIds(Long[] vegetableIds)
    {
        return vegetablesMapper.deleteVegetablesByVegetableIds(vegetableIds);
    }

    /**
     * 删除蔬菜信息信息
     * 
     * @param vegetableId 蔬菜信息主键
     * @return 结果
     */
    @Override
    public int deleteVegetablesByVegetableId(Long vegetableId)
    {
        return vegetablesMapper.deleteVegetablesByVegetableId(vegetableId);
    }
}
